package net.zjitc.object.rollcall;


import java.util.Random;
import java.util.Scanner;

/**
 * @Author admin
 * @Date 2019/3/20 9:47
 */
public class Test {
    public static void main(String[] args) {
        Student[] s1804={
                new Student("吴灏琳"),new Student("杜源康"),new Student("李广彦"),
                new Student("林永俊"),new Student("朱志文"),new Student("田果"),
                new Student("严凯聪"),new Student("钟康"),new Student("管敏琦"),
                new Student("张起焕"),new Student("卢荣飞"),new Student("屠鑫炜"),
                new Student("胡新雨"),new Student("李光都"),new Student("杨文海"),
                new Student("朱浩帆"),new Student("杨扬健"),new Student("杨帆"),
                new Student("张扬"),new Student("王继飚"),new Student("管敏乾"),
                new Student("叶德候"),new Student("钱亮亮"),new Student("庄璋琰"),
                new Student("张恒冕"),new Student("陈挺"),new Student("万洲")
        };

        Student[] s1802={
                new Student("劳之寅"),new Student("徐贤达"),new Student("方阳照"),
                new Student("张哲"),new Student("李云昱"),new Student("陈通业"),
                new Student("陈琳"),new Student("崔宇星"),new Student("章晨杰"),
                new Student("张弛"),new Student("毛嘉辉"),new Student("周甲朗"),
                new Student("程泽睿"),new Student("何益名"),new Student("赵焌池"),
                new Student("秦佳杰"),new Student("杨以诺"),new Student("金玉堂"),
                new Student("阮渝轩"),new Student("霍永旗"),new Student("吴宗龙"),
                new Student("余德帅"),new Student("石泽润"),new Student("吴洲"),
                new Student("林程鹏"),new Student("丁宁宇"),new Student("吴学誉"),
                new Student("余淮"),new Student("徐宁婉"),new Student("姜烨丰"),
                new Student("施博琛"),new Student("胡洋洋"),new Student("李叶露"),
                new Student("汪丽鹏"),new Student("杨震昊")
        };


        System.out.println("随机点名哪个班级？2--软件1802  4--软件1804");
        Scanner scanner=new Scanner(System.in);
        int a=scanner.nextInt();
        Classes rj;
        if(a==2){
            rj=new Classes("软件1802",s1802);
        }else if(a==4){
            rj=new Classes("软件1804",s1804);
        }else{
            rj=new Classes();
        }
        System.out.println("班级学生名单如下：");
        for (int i = 0; i <rj.getStudents().length ; i++) {
            System.out.print(rj.getStudents()[i].getName()+"\t");
            if((i+1)%5==0){
                System.out.println();
            }
        }
        System.out.println();
        Random  r=new Random();
        int random=r.nextInt(rj.getStudents().length);
        System.out.println("有请："+rj.getStudents()[random].getName());






    }
}
